/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.ope.be;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 *
 * @author infzt
 */
@Entity
@Table(name = "OPE_PLATAFORMA", catalog = "SIGEMFI", schema = "dbo", uniqueConstraints = {@UniqueConstraint(columnNames = {"FID_SEG_SUCURSAL"})})
@NamedQueries({@NamedQuery(name = "Plataforma.findAll", query = "SELECT p FROM Plataforma p"), @NamedQuery(name = "Plataforma.findByIdPlataforma", query = "SELECT p FROM Plataforma p WHERE p.idPlataforma = :idPlataforma"), @NamedQuery(name = "Plataforma.findByEstado", query = "SELECT p FROM Plataforma p WHERE p.estado = :estado")})
public class Plataforma implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_PLATAFORMA", nullable = false)
    private Long idPlataforma;
    @Column(name = "ESTADO", length = 10)
    private String estado;

    public Plataforma() {
    }

    public Plataforma(Long idPlataforma) {
        this.idPlataforma = idPlataforma;
    }

    public Long getIdPlataforma() {
        return idPlataforma;
    }

    public void setIdPlataforma(Long idPlataforma) {
        this.idPlataforma = idPlataforma;
    }

    public String getEstado() {
        return estado;
    }

    public void setEstado(String estado) {
        this.estado = estado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPlataforma != null ? idPlataforma.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Plataforma)) {
            return false;
        }
        Plataforma other = (Plataforma) object;
        if ((this.idPlataforma == null && other.idPlataforma != null) || (this.idPlataforma != null && !this.idPlataforma.equals(other.idPlataforma))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.ope.be.Plataforma[idPlataforma=" + idPlataforma + "]";
    }

}
